#ifndef RTC
#define RTC

struct RTC_TIME 
{
	volatile uint8_t  HOUR;
	volatile uint8_t  MINUTE;
	volatile uint8_t  SECOND;
	volatile uint8_t  DAY;
	volatile uint8_t  MONTH;
	volatile uint16_t YEAR;
};

extern struct RTC_TIME RTC_time;

void RTC_init();
void RTC_SetSecondCallback( void (*call)() );
void RTC_SetMinuteCallback( void (*call)() );

#define sbiBF(port,bit)  (port |= (1<<bit))   //set bit in port
#define cbiBF(port,bit)  (port &= ~(1<<bit))  //clear bit in port

#endif
